<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        123
        <!--    this is comment    -->
        <strong></strong>
        <span></span>
        <em></em>
        <i></i>
        <b></b>
    </div>
    <script>
        var div = document.getElementsByTagName("div")[0];
        function retElementChild(node) {
            // var arr = [],
            var temp = {
                length: 0,
                push: Array.prototype.push,
                splice : Array.prototype.splice
            },
                child = node.childNodes,
                len = child.length;
            for (var i=0; i<len; i++){
                if(child[i].nodeType === 1){
                    temp.push(child[i])
                }
            }
            return temp
        }
        var nodes = retElementChild(div);
        console.log(nodes);
    </script>







</body>
</html>
